import datetime
import time

today = datetime.date.today()
print(today)
print(type(today))
print(today.year)
print(today.month)
print(today.day)
print(today.strftime("%b %d %Y"))
date_str = "2022-04-28"
# date_str = time.strftime("%Y-%m-%d", time.localtime())
new_date = datetime.date.fromisoformat(date_str)
print(new_date)
print(type(new_date))
print(today.weekday())
print(new_date.weekday())
print(today.isoweekday())
print(new_date.isoweekday())
time_obj = datetime.time(23, 30, 15, 86882)
print(time_obj)
print(time_obj.hour)
print(time_obj.minute)
print(time_obj.second)
print(time_obj.microsecond)
print(time_obj.isoformat())
print(type(time_obj.isoformat()))
print(type(time_obj))
now = datetime.datetime.now()
print(now)
print(type(now))
utc_now  = datetime.datetime.now(datetime.UTC)
print(utc_now)
datetime_str = "2025-06-20 08:00:13"
new_datetime = datetime.datetime.fromisoformat(datetime_str)
print(new_datetime)
print(type(new_datetime))
cur_datetime = new_datetime.isoformat()
print(cur_datetime)
print(type(cur_datetime))
delta = datetime.timedelta(days=5, hours=3)
print(delta)
now = datetime.datetime.now()
print(now)
future = now + delta
print(future)
print(type(delta))
time_diff = future - now
time_diff2 = future - delta
print(time_diff)
print(time_diff2)
print(datetime.MAXYEAR)
print(datetime.MINYEAR)